package cn.cs.client;

import cn.cs.common.Dto;
import cn.cs.common.Page;
import cn.cs.config.CsConfiguration;
import cn.cs.fallback.ClientUserClientFallBack;
import cn.cs.fallback.UserAddressFallBack;
import cn.cs.pojo.ClientRepRel;
import cn.cs.pojo.ClientUser;
import cn.cs.pojo.UserAddress;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-user-provider", configuration = CsConfiguration.class, fallback = UserAddressFallBack.class)
public interface RestUserAddressClient {

    @RequestMapping(value = "/getUserAddressListById", method = RequestMethod.POST)
    public List<UserAddress> getUserAddressListById(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getUserAddressById", method = RequestMethod.POST)
    public List<UserAddress> getUserAddressById(@RequestParam("userId") String userId)throws Exception;

    @RequestMapping(value = "/getUserAddressByOnceId", method = RequestMethod.POST)
    public UserAddress getUserAddressByOnceId(@RequestParam("id") String id)throws Exception;

    @RequestMapping(value = "/getUserAddressListByMap", method = RequestMethod.POST)
    public List<UserAddress> getUserAddressListByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getUserAddressCountByMap", method = RequestMethod.POST)
    public Integer getUserAddressCountByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/itriptxAddUserAddress", method = RequestMethod.POST)
    public Integer itriptxAddUserAddress(@RequestBody UserAddress userAddress)throws Exception;

    @RequestMapping(value = "/itriptxModifyUserAddress", method = RequestMethod.POST)
    public Integer itriptxModifyUserAddress(@RequestBody UserAddress userAddress)throws Exception;

    @RequestMapping(value = "/modifyUserAddressByUserId", method = RequestMethod.POST)
    public Integer modifyUserAddressByUserId(@RequestBody UserAddress userAddress)throws Exception;

    @RequestMapping(value = "/itriptxDeleteUserAddressById", method = RequestMethod.POST)
    public void itriptxDeleteUserAddressById(@RequestParam("id") String id)throws Exception;

    @RequestMapping(value = "/updateAddressTypeId", method = RequestMethod.POST)
    public void updateAddressTypeId(@RequestParam("id") String id)throws Exception;



}

